<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    //字面量对象
let person = {
    name:王坤绩,
    age:22
};
//fro--in 遍历 拿到的是对象的属性值
for(let key in person){ //key是这个对象的所有属性名
    console.log(key,person[key]);
}
console.log(person);

</script>
